package com.wzy.service.impl;

import com.wzy.mapper.SysUserMapper;
import com.wzy.pojo.SysUser;
import com.wzy.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @auth wzy
 * @date 2023/10/24 14:30
 */
@Transactional
@Service
public class SysUserServiceImpl implements SysUserService {

    @Autowired
    private SysUserMapper sysUserMapper;

    @Transactional(propagation = Propagation.SUPPORTS)
    @Override
    public List<SysUser> selectSysUserList(SysUser sysUser) {
        return sysUserMapper.selectSysUserList(sysUser);
    }

    @Override
    public int addUser(SysUser sysUser) {

        int result = sysUserMapper.add(sysUser);
        int n = 1/0;
        return result;

    }
}
